Follow these steps to get started with the TypeDoc Pages Plugin:
Run the following command to ensure you have TypeDoc installed:
$ npm install --save-dev typedoc
Run the following command to ensure you have the TypeDoc Page Plugin installed:
$ npm install --save-dev typedoc-plugin-pages
TypeDoc will automatically detect the plugin once it has been installed.
Next, you need to create at least one documentation page. Create a new markdown file, sample-page.md
, in your repository:
/documentation/sample/sample-page.md
This is a sample documentation page:
- Item 1
- Item 2
- Item 3
To configure the plugin, create a pagesconfig.json
file in the same directory as your typedoc.json
file:
pagesconfig.json
{
"groups": [
{
"title": "Documentation",
"pages": [
{
"title": "My Page",
"source": "./documentation/sample/sample-page.md"
}
]
}
]
}
There are several ways to define plugin configuration. To learn more about configuring the plugin via the typedoc.json
file or how to customize the plugin configuration file path, see Configuration File.
To configure TypeDoc to use the integrated Pages Plugin theme, add the following property to your typedoc.json
file:
typedoc.json
{
"theme": "pages-plugin"
}
This option can be passed via the command line as well:
$ typedoc --theme pages-plugin
Run TypeDoc to generate your documentation output:
$ typedoc
Generated using TypeDoc